package com.bitcola.chainserver.chain.trx.core;

public class NewAddressDemo{
  public static void main(String[] args) throws Exception{
    System.out.println("create a new address...");
    Credential c1 = Credential.create();
    System.out.printf("private key: %s\n",c1.getPrivateKey());
    System.out.printf("public key: %s\n",c1.getPublicKey());
    System.out.printf("address: %s\n",c1.getAddress());
    
    System.out.println("import a private key...");
    Credential c2 = Credential.fromPrivateKey("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
    System.out.printf("private key: %s\n",c2.getPrivateKey());
    System.out.printf("public key: %s\n",c2.getPublicKey());
    System.out.printf("address: %s\n",c2.getAddress());
  }
  
}